package com.neulogistics.contrib.warehouse.api.application.converter;

import com.neulogistics.contrib.warehouse.api.application.viewmodel.InventoryViewModel;
import com.neulogistics.contrib.warehouse.infrastructure.persistence.orm.po.InventoryPO;
import org.springframework.beans.BeanUtils;

public class InventoryPOVMConverter {
    public static InventoryViewModel POToVM(InventoryPO po){
        if(po == null)
            return null;

        InventoryViewModel viewModel = new InventoryViewModel();
        BeanUtils.copyProperties(po, viewModel);
        return viewModel;
    }
}
